import actionTypes from "./actionTypes"
import http from '../../service/http'
export function LoadFileAction(payload){
  return{
    type:actionTypes.LOAD_FILE_LIST,
    payload:payload,
  }
}
export function LoadFileActionAsync(payload){
  return dispatch=>{
    return http.fileList(payload).then((res)=>{
      dispatch(LoadFileAction(res.data))
    })
  }
}
export function DeleteFileActionAsync(payload){
  return dispatch=>{
    return http.fileDelete(payload)
  }
}